package com.achao.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: achao
 * @DateTime: 2022/10/14 17:04
 * @Description: TODO
 */

@RestController
@RequestMapping("/nacos")
public class ConfigController {

    @Value("${user.name}")
    private String name;

    @Value("${user.age}")
    private String age;

    @GetMapping("/config")
    public String getConfig(){
        return "帅气的"+ name +",今年"+age+"了.";
    }
}
